import {Fancybox} from '@fancyapps/ui'
import {Carousel} from '@fancyapps/ui'

Carousel.defaults = {
    ...Carousel.defaults,
    slidesPerPage: 'auto',
    transition: 'classic',
    center: false,
};
//Fancybox设置
Fancybox.defaults = {
    ...Fancybox.defaults,
    hideScrollbar: false,
    Carousel: {
        transition: 'classic',
    },
    Thumbs: {
        type: 'modern',
    },
    Images: {
        initialSize: "fit",
        zoom: false,
    },
    Toolbar: {
        display: {
            left: ['slideshow','infobar'],
            middle: ['toggle1to1','rotateCW','flipX','flipY','fullscreen',],
            right: ['thumbs','close'],
        },
    },
};
Fancybox.bind("[data-fancybox]", {
    ...Fancybox.defaults,
});
//@ts-ignore
Fancybox.bind('[data-fancybox="div"]', {
    defaultType: "html",
    autoFocus: false,
    groupAttr: false,
    dragToClose: false,
});
export default defineNuxtPlugin(nuxt => {
    //@ts-ignore
    nuxt.vueApp.use()
})
